package ren.xbcr.schoolbus.client.util;

import android.os.Handler;

/**
 * Created by Jian on 2015/12/3.
 */
public class PeriodTask {

    static private Handler handler = new Handler();
    Runnable task;

    public PeriodTask(Runnable task, long time) {
        this.task = task;
        handler.removeCallbacks(task);
        handler.postDelayed(task, time);
    }
}
